using System;
using System.Collections.Generic;
using System.Text;
using BuildingBasicDomain;
using CommonTypes;

namespace BuildingStructuralElements
{
    public class Shrinkage 
    {
        FieldWithUndo m_Name;
        FieldWithUndo m_Position;
        FieldWithUndo m_Length;

        public double Length
        {
            get { return (double)m_Length.Value; }
            set { m_Length.Value = value; }
        }

        protected FieldWithUndo m_Eps;

        public double Eps
        {
            get { return (double)m_Eps.Value; }
            set { m_Eps.Value = value; }
        }



        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">The name for the Shrinkage</param>
        /// <param name="length">The length of the Shrinkage</param>
        public Shrinkage(string name, Vector position, double length, double eps)

        {
            m_Length = new FieldWithUndo(this);
            m_Eps = new FieldWithUndo(this);

            m_Length.Value = length;

            m_Eps.Value = eps;
        }



        public void SetLength(double val) { m_Length.SetNewValue(val); }

        public void SetLengthAndPos(double l, Vector pos)
        {
            m_Length.SetNewValue(l);
            m_Position.SetNewValue(pos);
        }

        public void SetEps(double val) { m_Eps.SetNewValue(val); }

    }
    /* without fieldundo 

    public class Shrinkage
    {

        Vector m_Position;

		double m_Length;
		public double length
		{
			get{ return (double)m_Length; }
			set{ m_Length = value; }
		}

		protected double m_Eps;

		public double Eps
		{
			get { return (double)m_Eps; } 
			set { m_Eps = value; }
		}



		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="name">The name for the Shrinkage</param>
		/// <param name="length">The length of the Shrinkage</param>
		public Shrinkage(string name, Vector position, double length, double eps) 

		{

			m_Length = length;

			m_Eps = eps;
		}


		public void SetLength(double val)	{	m_Length=(val);	}

		public void SetLengthAndPos(double l, Vector pos)
		{
			m_Length= l ;
			m_Position= pos ;
		}

		public void SetEps(double val)	{	m_Eps=(val);	}

    }
     * */
}
